<!--
 * @Author: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @Date: 2022-08-17 10:37:59
 * @LastEditors: 郭招娣 10615594+guo-zhaodi@user.noreply.gitee.com
 * @LastEditTime: 2022-08-25 09:46:33
 * @FilePath: \后端管理系统\app\src\views\Goods\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <MyBreadcrumb :breadList="$route.meta.breadList" />
    <el-card class="box-card">
      <UserSearch :userObj="goodsObj" v-on:init-search="initSearch">
        <el-button type="primary" @click="addGoods">添加商品</el-button>
      </UserSearch>

      <GoodsTable
        :tableData="tableData"
        :ruleForm='ruleForm'
        :total="total"
        :goodsObj="goodsObj"
        v-on:page-change="pageChange"
      />
    </el-card>
  </div>
</template>

<script>
import GoodsTable from "./component/GoodsTable.vue";
import UserSearch from "../../components/Search.vue";
// mixins
import Goods from "../../mixins/goods";
export default {
  mixins: [Goods],
  components: {
    GoodsTable,
    UserSearch,
  },
  data() {
    return {
      ruleForm: {
        goods_cat: "",
        goods_name: "",
        goods_price: 0,
        goods_number: 0,
        goods_weight: 0,
      },
    };
  },
  methods: {
   
  },
};
</script>

<style>
.box-card {
  margin-top: 20px;
}
</style>